package com.itheima.admin.task;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @version 1.0
 * @description 说明
 * @package com.itheima.admin.task
 */
@Component
@Slf4j
public class TestTask {

    @XxlJob("testTask")
    public ReturnT<String> abc(String param){
        // 向调度中心打日志
        XxlJobLogger.log("测试任务开始运行...");
        log.debug("使用xxl-job整合admin微服.....param={}",param);
        XxlJobLogger.log("测试任务运行结束...");
        return ReturnT.SUCCESS;
    }
}
